<table class="content_table" style="width:700px">
    <colgroup style="width:48px"></colgroup>
    <colgroup style="width:*"></colgroup>
    <colgroup style="width:160px"></colgroup>
    <colgroup style="width:160px"></colgroup>
    <tr id="header">
        <td>#</td>
        <td>Nick gracza</td>
        <td>Uprawnienia</td>
        <td>Data utworzenia</td>
    </tr>
    <?php
    $i = 12 * ($Page - 1) + 1;
    foreach ($pager->getResult() as $player):
        ?>
        <tr>
            <td><?php echo $i++ ?></td>
            <td id="content_name"><?php echo $player->getNick(); ?></td>
            <td>
                <?php
                $mod = $player->getMod();
                $admin = $player->getAdmin();

                if ($mod == 0 && $admin == 0) {
                    echo '<span style="font-weight:bold">gracz</span>';
                } else {
                    echo '<a class="rules_option content_option" href="'.url_for('@set_permission?id=' . $player->getId() . '&p=3').'">gracz</a>';
                }
                echo ' | ';

                if ($mod == 1 && $admin == 0) {
                    echo '<span style="font-weight:bold">mod</span>';
                } else {
                    echo '<a class="rules_option content_option" href="'.url_for('@set_permission?id=' . $player->getId() . '&p=2').'">mod</a>';
                }
                echo ' | ';
                
                if ($mod == 0 && $admin == 1) {
                    echo '<span style="font-weight:bold">admin</span>';
                } else {
                    echo '<a class="rules_option content_option" href="'.url_for('@set_permission?id=' . $player->getId() . '&p=1').'">admin</a>';
                }
                ?>
            </td>
            <td><?php echo $player->getCreatedAt('d.m.Y H:i') ?></td>
        </tr>
    <?php endforeach ?>
    <tr>
        <td colspan="4" id="footer">

            <div class="pagination_small">
                <?php if ($pager->getTotalPages() > 1): ?>
                    <?php if ($link = $pager->getPrev()): ?>
                        <?php echo link_to('«', url_for('@players' . '?page=' . $link)) ?>
                    <?php endif ?>

                    <?php foreach ($pager->getPrevLinks() as $link): ?>
                        <?php echo link_to($link, url_for('@players' . '?page=' . $link)) ?>
                    <?php endforeach ?>

                    <?php echo $pager->getPage() ?>

                    <?php foreach ($pager->getNextLinks() as $link): ?>
                        <?php echo link_to($link, url_for('@players' . '?page=' . $link)) ?>
                    <?php endforeach ?>

                    <?php if ($link = $pager->getNext()): ?>
                        <?php echo link_to('»', url_for('@players' . '?page=' . $link)) ?>
                    <?php endif ?>

                <?php endif; ?>
            </div>	

        </td>
    </tr>
</table>


<?php 
/*
<a class="rules_option content_option" href="<?php echo $rule->getType() ? url_for('@mod_rules_edit_tree?id=' . $rule->getId()) : url_for('@mod_rules_edit_matrix?id=' . $rule->getId())  ?>" title="Edytuj zasady gry"><?php echo image_tag('iEdit.png', array('class' => 'option_img')) ?>edytuj</a>-->

 * ?>
 */